package com.ruoyi.business.service.impl;

import java.util.Date;
import java.util.List;

import com.ruoyi.business.domain.Appointment;
import com.ruoyi.business.domain.Statement;
import com.ruoyi.business.service.IAppointmentService;
import com.ruoyi.common.exception.ServiceException;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.StatementItemMapper;
import com.ruoyi.business.domain.StatementItem;
import com.ruoyi.business.service.IStatementItemService;
import com.ruoyi.common.core.text.Convert;
import org.springframework.transaction.annotation.Transactional;

/**
 * 结算单明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-01-30
 */
@Service
@Transactional
public class StatementItemServiceImpl implements IStatementItemService {
    @Autowired
    private StatementItemMapper statementItemMapper;


    /**
     * 查询结算单明细
     * 
     * @param id 结算单明细主键
     * @return 结算单明细
     */
    @Override
    public StatementItem selectStatementItemById(Long id)
    {
        return statementItemMapper.selectStatementItemById(id);
    }

    /**
     * 查询结算单明细列表
     * 
     * @param statementItem 结算单明细
     * @return 结算单明细
     */
    @Override
    public List<StatementItem> selectStatementItemList(StatementItem statementItem)
    {
        return statementItemMapper.selectStatementItemList(statementItem);
    }

    /**
     * 新增结算单明细
     * 
     * @param statementItem 结算单明细
     * @return 结果
     */
    @Override
    public int insertStatementItem(StatementItem statementItem)
    {
        return statementItemMapper.insertStatementItem(statementItem);
    }

    /**
     * 修改结算单明细
     * 
     * @param statementItem 结算单明细
     * @return 结果
     */
    @Override
    public int updateStatementItem(StatementItem statementItem)
    {
        return statementItemMapper.updateStatementItem(statementItem);
    }

    /**
     * 批量删除结算单明细
     * 
     * @param ids 需要删除的结算单明细主键
     * @return 结果
     */
    @Override
    public int deleteStatementItemByIds(String ids)
    {
        return statementItemMapper.deleteStatementItemByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除结算单明细信息
     * 
     * @param id 结算单明细主键
     * @return 结果
     */
    @Override
    public int deleteStatementItemById(Long id)
    {
        return statementItemMapper.deleteStatementItemById(id);
    }

    @Override
    public void deleteByStatemenyId(Long statementId) {
        statementItemMapper.deleteByStatemenyId(statementId);
    }

    @Override
    public List<StatementItem> query(Long statementId) {
        return statementItemMapper.queryForStatementId(statementId);
    }


}
